-
Notifications
You must be signed in to change notification settings - Fork 49
Add RunTask.shell task #898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@ricardozanini could you share with me a example of arguments? Should be something similar to: document:
dsl: '1.0.1'
namespace: test
name: run-shell-example
version: '0.1.0'
do:
- runShell:
run:
shell:
command: 'kubectl'
arguments:
- 'apply'
- '-f'
- '/k8s'And the output should be: kubectl apply -f /k8sI am assuming that |
|
Great @fjtirado, nice abstractions ;) |
|
@mcruzdev yes, the arguments are a list: https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#shell-process Which kind of example do you need? |
Ok, it is all, I think I do not need a example 😄 I had a confusion due to |
You can do: arguments:
- key: valueMaybe in some use cases that would make sense. |
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
It is not clear to me again @ricardozanini, what is the real command statement in that case? The arguments will be used like an input (like |
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Just minor comments, except the error one.
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcruzdev Another coupple of comments related with IOException handling
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
|
@mcruzdev I think we already discussed in Slack, but since the spec expects a map we can have the following cases: run:
shell:
command: 'echo "Hello"'
attributes:
- one
- two
- threeIn this case, the resulting command would be Now, if we have: run:
shell:
command: 'echo "Hello"'
attributes:
- key: one
- key: two
- key: threeThe resulting command would be Is that clear? |
Hi @ricardozanini, I created a workflow document with the The only way to use
|
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
Enable test only in linux (till we implement for other Operating systems) Run asynchrnously Signed-off-by: fjtirado <ftirados@redhat.com>
Enable test only in linux (till we implement for other Operating systems) Run asynchrnously Signed-off-by: fjtirado <ftirados@redhat.com>
Context
Implement RunTask.shell task:
Tracking
awaitreturnCloses #892